const _ = require('lodash');
const async = require('async');
const services = require('../../services');

const eLancoService = services.eLanco;

module.exports = (req, res, callback) => {
  const params = req.query;
  const pageId = params.pageId;
  async.parallel({
    submitList: async.apply(eLancoService.getSubmitList, params),
    pageTotal: async.apply(eLancoService.getSubmitListPageTotal, params),
  }, (error, result) => callback(error, _.assign(result, { pageId })));
};
